<template>
  <remote-js :src="jsUrl" />
</template>

<script>
export default {
  components: {
    'remote-js': {
      render(createElement) {
        return createElement('script', {
          attrs: { type: 'text/javascript', src: this.src },
          on: {
            load: function() {
              // console.log('load js')
            }
          }
        })
      },
      props: {
        src: { type: String, required: true }
      }
    }
  },
  props: {
    jsUrl: { type: String, required: true } // 需要加载的外部url
  }
}
</script>
